package com.qf.security1.mapper;

import com.qf.security1.domain.Resources;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ResourcesMapper {

    @Select("SELECT res.*,r.`rname`\n" +
            "FROM roles r,resources res,roles_res rr\n" +
            "WHERE r.`id`=rr.`roleId` AND res.id=rr.`resId`")
    @ResultMap("resMap")
    List<Resources> findAll();
}
